package service

import (
	"fmt"
	"github.com/spf13/viper"
)

func InitViper() {
	v := viper.New()
	v.SetConfigFile("conf/config.yaml")
	v.SetConfigType("yaml")
	err := v.ReadInConfig()
	if err != nil {
		panic(err)
	}
	if err = v.Unmarshal(&Conf); err != nil {
		panic(err)
	}
	fmt.Println("数据解析成功")
}
